import { findPrevParent } from '@ve/utils/utils'
//必须带done回调 执行完成调用
export default function closeWindow({ vm, action, done }) {
  console.log('关闭')
  if (action.extension.close.value.length > 0) {
    let layerId = action.extension.close.value[0]
    let getNowPageData = vm.$store.getters['preview/getNowPageData']
    let parentObj = findPrevParent([getNowPageData], layerId, '_id', 'list')
    if (parentObj) {
      parentObj.hasSubPageShow = false
    }
  }
  done(null, {})
}
